home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk2.zip / LZTIME.BAT < prev    next >
DOS Batch File  |  1990-02-15  |  3KB  |  62 lines

  1. echo off
  2. rem
  3. rem *** Listing 2-7 ***
  4. rem
  5. rem ***************************************************************
  6. rem * Batch file LZTIME.BAT, which builds and runs the            *
  7. rem * long-period Zen timer program LZTEST.EXE to time the code   *
  8. rem * named as the command-line parameter. Listing 2-5 must be    *
  9. rem * named LZTIMER.ASM, and Listing 2-6 must be named            *
  10. rem * LZTEST.ASM. To time the code in LST2-8, you'd type the      *
  11. rem * DOS command:                                                *
  12. rem *                                                             *
  13. rem * lztime lst2-8                                               *
  14. rem *                                                             *
  15. rem * Note that MASM and LINK must be in the current directory or *
  16. rem * on the current path in order for this batch file to work.   *
  17. rem *                                                             *
  18. rem * This batch file can be speeded up by assembling LZTIMER.ASM *
  19. rem * once, then removing the lines:                              *
  20. rem *                                                             *
  21. rem * masm lztimer;                                               *
  22. rem * if errorlevel 1 goto errorend                               *
  23. rem *                                                             *
  24. rem * from this file.                                             *
  25. rem *                                                             *
  26. rem * By Michael Abrash 4/26/89                                   *
  27. rem ***************************************************************
  28. rem
  29. rem Make sure a file to test was specified.
  30. rem
  31. if not x%1==x goto ckexist
  32. echo ***************************************************************
  33. echo * Please specify a file to test.                              *
  34. echo ***************************************************************
  35. goto end
  36. rem
  37. rem Make sure the file exists.
  38. rem
  39. :ckexist
  40. if exist %1 goto docopy
  41. echo ***************************************************************
  42. echo * The specified file, "%1," doesn't exist.
  43. echo ***************************************************************
  44. goto end
  45. rem
  46. rem copy the file to measure to TESTCODE.
  47. :docopy
  48. copy %1 testcode
  49. masm lztest;
  50. if errorlevel 1 goto errorend
  51. masm lztimer;
  52. if errorlevel 1 goto errorend
  53. link lztest+lztimer;
  54. if errorlevel 1 goto errorend
  55. lztest
  56. goto end
  57. :errorend
  58. echo ***************************************************************
  59. echo * An error occurred while building the long-period Zen timer. *
  60. echo ***************************************************************
  61. :end
  62.